﻿using System;
using System.Collections.Generic;
using System.Linq;
using FluentValidation.Results;

namespace LINQPad.OpenAccess.UI.Services
{
    /// <summary>
    /// User interaction service.
    /// </summary>
    public interface IUserInteractionService
    {
        /// <summary>
        /// Shows the 'cannot save due to validation errors' notification.
        /// </summary>
        /// <param name="validationFailures">The validation failures.</param>
        void ShowCannotSaveDueToValidationErrorsNotification( IList<ValidationFailure> validationFailures );
        /// <summary>
        /// Shows the connection test failed notification.
        /// </summary>
        /// <param name="exception">The exception.</param>
        void ShowConnectionTestFailedNotification( Exception exception );
        /// <summary>
        /// Shows the connection test succeeded notification.
        /// </summary>
        void ShowConnectionTestSucceededNotification( );
        /// <summary>
        /// Called to choose the app config for an open access context.
        /// </summary>
        /// <param name="appConfigFilePath">The app config file path.</param>
        /// <returns>
        ///   <c>true</c> on success; otherwise, <c>false</c>.
        /// </returns>
        bool TryChooseAppConfig( out string appConfigFilePath );
        /// <summary>
        /// Called to choose the assembly of the open access context.
        /// </summary>
        /// <param name="assemblyFilePath">The assembly file path.</param>
        /// <returns>
        ///   <c>true</c> on success; otherwise, <c>false</c>.
        /// </returns>
        bool TryChooseAssembly( out string assemblyFilePath );
    }

}
